//
//  NSObject+WLCache.h
//  xiacai
//
//  Created by 专注 on 2017/12/27.
//  Copyright © 2017年 TBS. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

#define save_wl_Keys(tag,key) [NSString stringWithFormat:@"%@%@",tag,key]

/** 缓存类型 */
typedef enum : NSUInteger {
    defaultData_wl,
    imageData_wl,
    jsonData_wl,
} dataType_wl;

typedef enum : NSUInteger {
    toDay_wl,
    otherDay_wl,
    noCache_wl,
} cacheType_wl;

@interface NSFileManager (WLCache)

/** 读取数据 */
+ (id)readKey_wl:(NSString *)keys
      folderName:(NSString *)folderName
        dataType:(dataType_wl)type;


/** 缓存数据 */
+ (NSString *)saveData_wl:(id)saveData
                key:(NSString *)keys
         folderName:(NSString *)folderName
           dataType:(dataType_wl)type;

/** 读取数据路径 */
+ (NSString *)readKeyForPath_wl:(NSString *)keys
                     folderName:(NSString *)folderName
                       dataType:(dataType_wl)type;

@end
